FIG. 17 is an explanatory view of the principle of a typical triangulation method.
As shown in FIG. 17, the conventional and general optical distance-measuring device includes, for example, a light-emitting element 201, a light-receiving element 202, a light-emitting lens 203, and a light-receiving lens 204.
In the optical distance-measuring device, light flux emitted from the light-emitting element 201 placed at the origin (0, 0) is turned into substantially parallel light flux (light-emission axis 205) by the light-emitting lens 203 placed at the point A (0, d). The substantially parallel light flux is applied as spot light onto the point B (0, y) on an object 211 subject to distance measurement. Light flux (light-receptive axis 206) reflected by the object 211 subject to distance measurement is gathered by the light-receiving lens 204 (light-gathering lens) placed at the point C (L, d), and the gathered light forms a light-receiving spot by being focused on the point D (L+1. 0) on the light-receiving element 202, which is placed on an axis lying along an x-direction. Here, assume that the point E (L, 0) is a point at which a line passing through the point C (center of the light-receiving lens 204) and being parallel to a y-axis intersects with a light-receiving surface of the light-receiving element 202. In this case, a triangle ABC is similar to a triangle ECD. Therefore, when the position of the light-receiving spot is detected by means of the light-receiving element 202 to measure a side ED (=1), a distance y to the object 211 subject to distance measurement is calculated by the following equation (1):
                    y        =                                            L              ·              D                        l                    .                                    (        1        )            
As described above, the optical distance-measuring device detects the position of a light-receiving spot formed on the light-receiving element 20, and calculates the distance to the optical distance-measuring device in accordance with the equation (1). In order to measure the distance accurately, a distance L between the light-emitting lens 203 and the light-receiving lens 204 and a distance d between the light-receiving lens 204 and the light-receiving element 202 need to be fixed.
FIG. 18 is a cross-sectional view showing the configuration of a typical optical distance-measuring device 300 using the above principle.
As shown in FIG. 18, the optical distance-measuring device 300 includes a light-emitting element 201, the light-receiving element 202, the light-emitting lens 203, and the light-receiving lens 204, all of which are retained by a case 301. The case 301 is usually made from a light-shielding resin for cost reduction.
In the optical distance-measuring device 300, the case 301, which is usually formed from a resin having a high thermal expansion coefficient, expands and contracts due to ambient temperature changes. This causes the following problem. For example, expansion of the case 301 due to rise in ambient temperature causes shifts of the light-emitting lens 203 and the light-receiving lens 204 to the positions indicated by broken lines, respectively. This changes (increases) the distance L between the lenses. As a result, an optical axis 205a of the light-emitting lens 203 and an optical axis 206a of the light-receiving lens 204 at room temperature turn to an optical axis 205b and an optical axis 206b as indicated by broken lines, respectively. In this case, the position of a light-receiving spot formed on the light-receiving element 202 shifts outwards as compared with the position of the light-receiving spot at room temperature while the position of the object 211 subject to distance measurement remains unchanged. Thus, at the rise in ambient temperature, for example, the position of the object 211 subject to distance measurement is incorrectly measured as being closer than its actual position.
Patent Literatures 1 and 2 disclose the techniques that solve the above problem. FIG. 19 is a cross-sectional view showing the configuration of an optical distance-measuring device 400 described in Patent Literature 1. FIG. 20 is a cross-sectional view showing the configuration of an optical distance-measuring device 500 described in Patent Literature 2.
As shown in FIG. 19, the optical distance-measuring device 400 includes a light-emitting element 401, a light-receiving element 402, a floodlighting lens (light-emitting lens) 403, and a light-receiving lens 404. The floodlighting lens 403 and a package 405 to house the light-emitting element 401 are fixed in a first case 406, while the light-receiving lens 404 and a package 407 to house the light-emitting element 402 are fixed in a second case 408. The first case 406 and the second case 408 are connected to each other with a main unit 409, which constitutes a main case 410.
In the optical distance-measuring device 400 with such configuration, even when thermal expansion of the main case 410 occurs, the light-emitting element 401 and the floodlighting lens 403 are kept in position to each other in the first case 406, and the light-receiving element 402 and the light-receiving lens 404 are kept in position to each other in the second case 408. This causes no changes in distance from the center position of the light-receiving element 402 to the position of a reflected light spot, which secures an accuracy of distance measurement.
As shown in FIG. 20, the optical distance-measuring device 500 includes an imaging lenses 501a and 501b, a retainer 502 for the imaging lenses 501a and 501b, a CCD packages 503a and 503b (optical sensor arrays), and a retainer 504 for the CCD packages 503a and 503b. In the optical distance-measuring device 500, the imaging lenses 501a and 501b and the retainers 502 and 504 are all formed from the same material which is made from non-hygroscopic plastic.
In the optical distance-measuring device 500 with such configuration, the imaging lenses 501a and 501b and the retainers 502 and 504 stretch evenly by thermal expansion. This makes it possible to prevent decreased distance measurement accuracy caused by temperature changes.
In the case of the optical distance-measuring devices 400 and 500, the light-emitting element, the light-receiving element, and the lens retainers evenly expand and contract at the occurrence of ambient temperature changes, the light-emitting element and the light-receiving element are kept in position to the lenses to satisfy the principle of triangulation. However, the optical distance-measuring devices 400 and 500 have the following problem. That is, in the event of the occurrence of self-heating in the light-emitting element and the light-receiving element, uneven temperature changes in the entire device cause differences in temperature between the components located near the light-emitting element or the light-receiving element and the components located near the lenses. Accordingly, expansion and contraction of the components occur in different amounts. This causes a failure to keep the light-emitting element and the light-receiving element in position to the lenses.
Any methods for correcting the position of the light-receiving spot at the occurrence of such uneven temperature changes are not described in Patent Literatures 1 and 2. Therefore, the techniques described in Patent Literatures 1 and 2 cannot prevent decreased distance measurement accuracy caused by self-heating of the light-emitting element and the light-receiving element, which results in unsatisfactory utilization of the principle of triangulation method.
A technique for resolving such a problem is disclosed in Patent Literature 3. FIG. 21 is a cross-sectional view showing the configuration of an optical distance-measuring device 600 described in Patent Literature 3.
As shown in FIG. 21, the optical distance-measuring device 600 includes a pair of lenses 601a and 601b, a pair of CCD packages 602a and 602b, a lens retainer 603, a CCD retainer 604, and temperature sensors 605 and 606. The temperature sensor 605 is mounted on the lens retainer 603 in an area between the lenses 601a and 601b. The temperature sensor 606 is mounted on the retainer 604 in an area between the CCD packages 602a and 602b. 
In the optical distance-measuring device 600 with such configuration, outputs of the temperature sensors 605 and 606 are used to obtain temperature difference between the lens retainer 603 and the CCD retainer 604 at the occurrence of self-heating of CCD chips 607a and 607b (light-receiving elements) in the respective CCD packages 602a and 602b. The obtained temperature difference is used to correct the amount of shift of object images formed on the CCD chips 607a and 607b. This makes it possible to correct difference in degree of thermal expansion between the lens retainer 603 and the CCD retainer 604 at the occurrence of self-heating of the CCD chips 607a and 607b, and to thus maintain distance measurement accuracy.
However, in the optical distance-measuring device 600, the temperature sensors 605 and 606 are necessary for preventing decreased distance measurement accuracy. Further, the temperature sensors 605 and 606 cannot be embedded in the CCD chips 607a and 607b, or other components, and must be separately disposed in contact with the lens retainer 603 and the CCD retainer 604, respectively. Besides, the temperature sensors 605 and 606 require wirings for transmission of output signals from the temperature sensors 605 and 606. This complicates the structure of the optical distance-measuring device 600, thus resulting in increased number of steps for assembly of the optical distance-measuring device 600 and difficulty in offering the optical distance-measuring device 600 at low cost.
One approach for realizing the optical distance-measuring device 600 with more simplified structure is considered to provide only one of the temperature sensors 605 and 606. However, this approach causes the problems described below.
FIG. 22 is a cross-sectional view showing the configuration of a conventional optical distance-measuring device 700.
As shown in FIG. 22, the optical distance-measuring device 700 is such that ambient heat evenly heats or cools the entire optical distance-measuring device 700 including its side surfaces and expands or contracts the components. This changes a distance between a light-emitting lens 703 and a light-receiving lens 704 and a distance between a light-emitting element 701 and a light-receiving element 702. Meanwhile, self-heating of the light-emitting element 701 and the light-receiving element 702 due to energization directly heats and expands a light-shielding resin section 705 in which the elements 701 and 702 are sealed. Further, heat emitted from the light-emitting element 701 and the light-receiving element 702 and heat transferred from the light-shielding resin section 705 to a lens retainer 706 that retains the light-emitting lens 703 and the light-receiving lens 704 indirectly heats and expands lens retaining parts of the lens retainer 706.
Therefore, when self-heating occurs, the light-shielding resin section 705 and the lens retainer 706, which are different in temperature from each other, expand depending upon their own thermal expansion coefficients, according to their respective temperature changes. Therefore, the amount of change in distance between the light-emitting lens 703 and the light-receiving lens 704 varies as follows. That is, when the optical distance-measuring device 700 is heated by ambient heat, the distance changes in amounts as indicated by arrows I. On the other hand, when the optical distance-measuring device 700 is heated by self-heating, the distance changes in amounts as indicated by arrows J.
Hence, in order to predict how much the distance between the elements 701 and 702 and the distance between the lenses 703 and 704 change, the optical distance-measuring device 700 needs to be provided with temperature sensors for detecting the temperatures of the light-shielding resin section 705 and the lens retainer 706 separately.
Even in the optical distance-measuring device 600, the amount of change in distance between the lenses 601a and 601b varies from the case where the optical distance-measuring device 600 is heated by ambient heat to the case where it is heated by self-heating. If the optical distance-measuring device 600 is configured to have the temperature sensor 605 mounted only on the lens retainer 603 or to have the temperature sensor 606 mounted only on the CCD retainer 604, the following inconvenience is caused. For example, in a case where temperature rise occurs, it is unclear whether temperature changes have been caused by rise in ambient temperature or self-heating. This causes a failure to exactly figure out a positional relation between the lenses 601a and 601b and the CCD chips 607a and 607b, resulting in decreased distance measurement accuracy.
For the optical distance-measuring device 300 shown in FIG. 18, for example, one approach for suppressing changes in distance between the light-emitting lens and the light-receiving lens due to thermal expansion caused by ambient heat and self-heating is considered to make part of the case 301, which retains the light-emitting lens 203 and the light-receiving lens 204, formed from metal. Specifically, a retaining part for the light-emitting lens 203 and the light-receiving lens 204 is realized by a metallic frame (lens frame), and the lens frame is attached to the case 301. Since some parts of the case 301 are made from metal having a low thermal expansion coefficient, it is possible to suppress the change in distance between the light-emitting lens and the light-receiving lens due to thermal expansion, and to eliminate variations of the change in distance between the light-emitting lens and the light-receiving lens due to thermal expansion caused by ambient heat and self-heating. Further, it is possible to realize cost reduction as compared with the configuration with the case 301 entirely made from metal.